package com.desire.service.impl;

import com.desire.dao.IUserDao;
import com.desire.entity.UserEntity;
import com.desire.service.IUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (D_Users)表服务实现类
 */
@Service
public class UserServiceImpl implements IUserService {
    @Resource
    private IUserDao userDao;

    @Override
    public UserEntity findUserById(Integer id) {
        return userDao.findUserById(id);
    }

    @Override
    public List<UserEntity> findUserAll() {
        return userDao.findUserAll();
    }

    @Override
    public UserEntity findUserForUsernameAndPwd(UserEntity userEntity) {
        return userDao.findUserForUsernameAndPwd(userEntity);
    }

    @Override
    public int addUser(UserEntity userEntity) {
        return userDao.addUser(userEntity);
    }

    @Override
    public int editUser(UserEntity userEntity) {
        return userDao.editUser(userEntity);
    }

    @Override
    public int deleteUser(Integer id) {
        return userDao.deleteUser(id);
    }
}
